package gd.qaq.blue.bluespick.util;

import java.sql.*;

public class SqlHelper
{
    protected Connection conn;
    protected Statement stmt;
    public Boolean isShow;
    protected String dbType;

    public SqlHelper(final String dbFileName) {
        this.conn = null;
        this.stmt = null;
        this.isShow = false;
        this.dbType = "sqlite";
        try {
            Class.forName("org.sqlite.JDBC");
        }
        catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        try {
            this.conn = DriverManager.getConnection("jdbc:sqlite:" + dbFileName);
        }
        catch (SQLException e2) {
            e2.printStackTrace();
        }
    }

    public PreparedStatement query(final String sql) throws SQLException {
        final PreparedStatement stmt = this.conn.prepareStatement(sql);
        return stmt;
    }

}
